The Get method retrieves a named value from a registry key without expanding any environment variables. The Get method supports the REG_SZ, REG_EXPAND_SZ, and REG_DWORD named-value data types.
Get(FullKeyValueName)
HKLM\Software\MyCompany\MyValue
The key portion of this parameter can be a key on either a local or a remote machine. Keys on a remote machine are specified by prefixing the key name with the machine name. For example:
\\RemoteMachine\HKLM\Software\MyProg
A VARIANT that contains the named value of the specified registry key. Any embedded environment variables will not have been expanded.
LogFileDirectory
and LogFileTruncateSize
from the registry key HKLM\System\CurrentControlSet\Services\W3SVC\Parameters\
.<% Set Reg = Server.CreateObject("IISSample.Registry") w3Params = "HKLM\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\" LogFileDir = Reg.Get(w3Params & "LogFileDirectory") LogFileDirExpand = Reg.GetExpand(w3Params & "LogFileDirectory") TruncateSize = Reg.Get(w3Params & "LogFileTruncateSize") %> Log files are stored in <% = LogFileDir %> (<% = LogFileDirExpand %>) and are truncated at <% = TruncateSize %> bytes.
Log files are stored in %SystemRoot%\System32\LogFiles (D:\WINNT\System32\LogFiles) and are truncated at 20480000 bytes.